package com.atguigu.statistics.controller;


import com.atguigu.utils.R;
import com.atguigu.statistics.service.StatisticsDailyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 * 网站统计日数据 前端控制器
 * </p>
 *
 * @author admin
 * @since 2020-07-18
 */
@RestController
@RequestMapping("/statistics/daily")
@Api(value = "StatisticsDailyController", description = "统计图")
public class StatisticsDailyController {

    @Resource
    private StatisticsDailyService statisticsDailyService;

    @GetMapping("/getStatistics/{date}")
    @ApiOperation("手动生成统计图")
    public R getStatistics(@PathVariable String date) {
        statisticsDailyService.getStatistics(date);
        return R.ok().data("", "");
    }
}

